export const tableInfo = {
  localize: {
    search: {
      url: "http://localhost:8080/customer/customer/search"
    },
    preset: {
      status: 1,
      userId: 2
    }
  },
  filters: [
    {
      name: "customerName",
      label: "客户名称"
    },
    {
      name: "status",
      label: "是否有效"
    },
    {
      name: "auditStatus",
      label: "审核状态"
    }
  ],
  columns: [
    {
      width: "50",
      label: "#",
      type: "index"
    },
    {
      label: "客户编号",
      name: "code"
    },
    {
      label: "客户名称",
      name: "name"
    },
    {
      label: "所属行业",
      name: "industryName"
    },
    {
      label: "公司网站",
      name: "url"
    },
    {
      label: "联系人",
      name: "contactName"
    },
    {
      label: "审核状态",
      name: "auditStatus"
    },
    {
      label: "公司简称",
      name: "abbr"
    },
    {
      label: "联系电话",
      name: "contactMobile"
    },
    {
      label: "是否有效",
      name: "statusName"
    },
    {
      label: "创建时间",
      name: "createAt"
    },
    {
      label: "操作",
      name: "action"
    }
  ],
  actions: [
    {
      title: "新增",
      type: "add",
      target: {
        resourceId: "23"
      }
    }
  ]
};
export const typeDialog = {
  title: "新增线下客户",
  entries: [
    { name: "name", label: "客户名称" },
    { name: "industry", label: "所属行业" },
    { name: "url", label: "公司网站" },
    { name: "abbr", label: "公司简称" },
    { name: "englishName", label: "公司英文名" },
    { name: "legalPersonName", label: "企业法人" },
    { name: "contactName", label: "联系人" },
    { name: "fax", label: "传真" },
    { name: "email", label: "邮箱" },
    { name: "address", label: "地址" },
    { name: "zipcode", label: "邮编" },
    { name: "wechatOfficialNo", label: "微信公众号" },
    { name: "bankName", label: "公司开户行" },
    { name: "bankAccount", label: "银行账号" },
    { name: "profile", label: "公司简介" },
    { name: "logo", label: "公司logo" },
    { name: "businessLicenseUrl", label: "营业执照" }
  ],
  actions: [
    {
      title: "保存",
      type: "submit",
      url: "http://localhost:8080/customer/customer"
    },
    { disabled: false, title: "返回", type: "back" }
  ],
  localize: {
    preset: {
      userId: 1,
      type: 0
    }
  },
  rules: {
    name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }],
    contactName: [
      { required: true, message: "联系人不能为空", trigger: "blur" }
    ],
    contactMobile: [
      { required: true, message: "联系电话不能为空", trigger: "blur" }
    ]
  }
};

class ViewData {
  constructor({ dirs, actions, entries }) {
    this.dirs = dirs;
    this.actions = actions;
    this.entries = entries;
  }
}

export { ViewData };
